package middleware

import (
	"fmt"

	"github.com/gin-gonic/gin"
)

func CheckToken(c *gin.Context) {
	fmt.Println("Check Token")
	token := c.GetHeader("token")
	if token == "" {
		c.JSON(200, gin.H{
			"code":    401,
			"message": "token校验失败",
		})
		c.Abort()
		return
	}
}
